package com.example.everying.model.entity.invite;/*
 * 项目名称: everything
 * 文件名: inviteRecords
 * 作者: 张泽阳
 * 日期: 2025/5/26
 * 描述:
 */


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "invite_records")
public class InviteRecordsEntity {
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "邀请记录主键ID")
    private String id;

    @ApiModelProperty(value = "邀请码归属用户id")
    private String ownerId;

    @ApiModelProperty(value = "邀请码id")
    @NotNull(message = "邀请码id不能为空")
    private String inviteCodeId;

    @ApiModelProperty(value = "被邀请人id")
    @NotNull(message = "被邀请人id不能为空")
    private String inviteeId;

    @ApiModelProperty(value = "被邀请人openid")
    private String inviteeOpenid;

    @ApiModelProperty(value = "邀请时间")
    private LocalDateTime useTime;
}
